import React from 'react';
// import { HeaderButtons, Item } from 'react-navigation-header-buttons';
import { Button } from 'react-native'
import { connect } from 'react-redux';

const mapStateToProps = ({ category }) => {
    return {
        isEdit: category.isEdit,
    };
};

const connector = connect(mapStateToProps);


function HeaderRightBtn(props) {
    const { onSubmit, isEdit } = props;
    return (
        <Button title={isEdit ? '完成' : '编辑'} onPress={onSubmit} >  </Button>
    );
}

export default connector(HeaderRightBtn);
